const state = () => ({
    shopInfo: {},   //  店铺基本信息
    shopDetailInfo:{
        address:"暂无店铺地址..."
    }  //店铺详情信息
})


const mutations = {
    // 保存商铺信息
    saveShopInfo(state, provider) {
        state.shopInfo = provider;
        //缓存商铺信息
        uni.setStorage({
            key: 'shopInfo',
            data: provider
        })
        console.log('state.shopInfo', state.shopInfo);
    },
    // 保存商铺详情信息
    saveShopDetailInfo(state, provider){
        state.shopDetailInfo = provider;
    }
}


export default {
    namespaced: true,
    state,
    mutations,
}